package com.ndood.payment.pojo.v1.comm.dto;

import java.io.Serializable;
import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import com.ndood.payment.pojo.v1.pay.UserPo;

public class PaymentUserDTO extends UserPo implements UserDetails, Serializable{

	private static final long serialVersionUID = 9198528579066731927L;

	@Override
	public Collection<? extends GrantedAuthority> getAuthorities() {
		return null;
	}

	@Override
	public String getPassword() {
		return null;
	}

	@Override
	public String getUsername() {
		// 坑，生成token的时候会用到，不写token只有一个
		return String.valueOf(this.getId());
	}

	@Override
	public boolean isAccountNonExpired() {
		return true;
	}

	@Override
	public boolean isAccountNonLocked() {
		return true;
	}

	@Override
	public boolean isCredentialsNonExpired() {
		return true;
	}

	@Override
	public boolean isEnabled() {
		return true;
	}
	
}
